Get the length in bytes of one array itemΒΆ
A.itemsize
Get the length in bytes of one array item in the internal representation.
from array import *
AI = array('i', [1, 3, 5, 7, 9])
print("Original array: " + str(AI))
# Original array: array('i', [1, 3, 5, 7, 9])
print("Length in bytes of one array item: " + str(AI.itemsize))
# Length in bytes of one array item: 4
See also: https://www.w3resource.com/python-exercises/array/python-array-exercise-4.php